const globalData = getApp().globalData;

Component({
  options: {
    multipleSlots: true // 在组件定义时的选项中启用多slot支持
  },
  properties: {
    left: {
      type: Boolean
    },
    center: {
      type: Boolean
    },
    right: {
      type: Boolean
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    navHeight: 0,
    statusBarHeight: 0
  },
  lifetimes: {
    ready() {
      this.setData({ navHeight: globalData.navHeight, statusBarHeight: globalData.statusBarHeight })
    }
  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleLeft() {
      wx.navigateBack()
    }
  }
})
